public class HF_ClientWSAccountclassi{   
   
   @future (callout=true)
      public static void AddAccountClassification(set<Id> clset) {
      string outputresult;
      List<Classification__c> clList = new List<Classification__c>([select Id,Account_PIMS_Id__c,ClassificationCode__c,ClassificationValue__c,Start_Date__c,StatusCode__c,End_Date__c,Description__c from Classification__c where ID In: clset]); 
      WebServiceFinal4.BasicEndpoint s = new WebServiceFinal4.BasicEndpoint();
      for(Classification__c cl: clList){
        
      //Insert classification details in ClassificationWrapper
            WebServiceFinal2.ClassificationWrapper c=new WebServiceFinal2.ClassificationWrapper();
            c.SfdcClassificationID= cl.Id;
            c.HFHIPartnerID=cl.Account_PIMS_Id__c;                     
            c.ClassificationCode=cl.ClassificationCode__c;                  
            c.ClassificationValue=cl.ClassificationValue__c;        
            c.NameID=0;
            c.StartDate=cl.Start_Date__c;
            c.EndDate=cl.End_Date__c;
            c.Status=cl.StatusCode__c;
            c.Comments=cl.Description__c;
            c.DataOn=system.DateTime.Now();
       try
       {
           outputresult=s.AddAccountClassification(c);
           system.debug('****'+outputresult);
       }
       catch(Exception ex)
          {
            system.debug('output from webservice: '+ex);       
          }
       }       
     } 
    
  @future (callout=true)
  public static void UpdateAccountClassification(set<Id> clset) {
      string outputresult;
      List<Classification__c> clList = new List<Classification__c>([select Id,Account_PIMS_Id__c,ClassificationCode__c,ClassificationValue__c,Start_Date__c,StatusCode__c,End_Date__c,Description__c from Classification__c where ID In: clset]); 
      WebServiceFinal4.BasicEndpoint s = new WebServiceFinal4.BasicEndpoint();
      for(Classification__c cl: clList){
         
      //Stores classification details in ClassificationWrapper for update
             WebServiceFinal2.ClassificationWrapper c=new WebServiceFinal2.ClassificationWrapper();
                    c.SfdcClassificationID= cl.Id;
                    c.HFHIPartnerID=cl.Account_PIMS_Id__c;
                    c.ClassificationCode=cl.ClassificationCode__c;
                    c.ClassificationValue=cl.ClassificationValue__c;
                    c.NameID=0;
                    c.StartDate=cl.Start_Date__c;
                    c.EndDate=cl.End_Date__c;
                    c.Status=cl.StatusCode__c;
                    c.Comments=cl.Description__c;
                    c.DataOn=system.DateTime.Now();
               try
               {
                     outputresult=s.UpdateAccountClassification(c);
                     system.debug('****'+outputresult);
               }
               catch(Exception ex)
               {   
                     system.debug('output from webservice: '+ex);       
               }
        }       
    } 
    
 }